﻿using System;
using System.Collections.Generic;

namespace MinimalistFoodStreet.BackEnd.Infrastructure.EFCore;

/// <summary>
/// 评价表(不允许修改只能删除)
/// </summary>
public partial class Comment
{
    /// <summary>
    /// r,u,d-编号
    /// </summary>
    public int CId { get; set; }

    /// <summary>
    /// c,r-评价人
    /// </summary>
    public int CAccountId { get; set; }

    /// <summary>
    /// c,r-评价商品
    /// </summary>
    public int? CGoodId { get; set; }

    /// <summary>
    /// c,r-评价订单详情
    /// </summary>
    public int? COrderDetailId { get; set; }

    /// <summary>
    /// c,r-主评论
    /// </summary>
    public int? CMainCommentId { get; set; }

    /// <summary>
    /// c,r-回复评论
    /// </summary>
    public int? CCommentId { get; set; }

    /// <summary>
    /// c,r-评分
    /// </summary>
    public int? CRate { get; set; }

    /// <summary>
    /// c,r-评价内容
    /// </summary>
    public string? CContent { get; set; }

    /// <summary>
    /// r-创建时间
    /// </summary>
    public DateTime CCreateTime { get; set; }

    public virtual Account CAccount { get; set; } = null!;

    public virtual Comment? CComment { get; set; }

    public virtual Good? CGood { get; set; }

    public virtual Comment? CMainComment { get; set; }

    public virtual OrderDetail? COrderDetail { get; set; }

    public virtual ICollection<CommentLike> CommentLikes { get; set; } = new List<CommentLike>();

    public virtual ICollection<CommentResource> CommentResources { get; set; } = new List<CommentResource>();

    public virtual ICollection<Comment> InverseCComment { get; set; } = new List<Comment>();

    public virtual ICollection<Comment> InverseCMainComment { get; set; } = new List<Comment>();
}
